<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>嵌入式基础知识——存储器 | ShuangChenYue</title>
    <meta name="generator" content="VuePress 1.9.10">
    <link rel="icon" href="https://cdn.jsdelivr.net/gh/cmty256/imgs-blog@main/logo/白云.38zbldnhh180.jpg">
    <meta name="description" content="满招损，谦受益">
    <meta name="keywords" content="专注于Cpp语言的旅行者">
    
    <link rel="preload" href="/assets/css/0.styles.952d6952.css" as="style"><link rel="preload" href="/assets/js/app.67adcfd9.js" as="script"><link rel="preload" href="/assets/js/4.9aaa1650.js" as="script"><link rel="preload" href="/assets/js/1.5474518c.js" as="script"><link rel="preload" href="/assets/js/3.593d14fc.js" as="script"><link rel="preload" href="/assets/js/178.d7d9def2.js" as="script"><link rel="prefetch" href="/assets/js/10.3242746b.js"><link rel="prefetch" href="/assets/js/100.9224de43.js"><link rel="prefetch" href="/assets/js/101.f0d1b059.js"><link rel="prefetch" href="/assets/js/102.996bfc6d.js"><link rel="prefetch" href="/assets/js/103.9bfdbd6f.js"><link rel="prefetch" href="/assets/js/104.8613f283.js"><link rel="prefetch" href="/assets/js/105.aa6e809e.js"><link rel="prefetch" href="/assets/js/106.90192392.js"><link rel="prefetch" href="/assets/js/107.e82a40b7.js"><link rel="prefetch" href="/assets/js/108.994cd438.js"><link rel="prefetch" href="/assets/js/109.ec15acc2.js"><link rel="prefetch" href="/assets/js/11.c04b41c1.js"><link rel="prefetch" href="/assets/js/110.c32d8576.js"><link rel="prefetch" href="/assets/js/111.453b5d50.js"><link rel="prefetch" href="/assets/js/112.ffbdb3a4.js"><link rel="prefetch" href="/assets/js/113.12b8ad7d.js"><link rel="prefetch" href="/assets/js/114.899d2998.js"><link rel="prefetch" href="/assets/js/115.b7ad9576.js"><link rel="prefetch" href="/assets/js/116.a8394748.js"><link rel="prefetch" href="/assets/js/117.0edfe25b.js"><link rel="prefetch" href="/assets/js/118.9161b1fe.js"><link rel="prefetch" href="/assets/js/119.be59e21b.js"><link rel="prefetch" href="/assets/js/12.41437bf6.js"><link rel="prefetch" href="/assets/js/120.bcf439fb.js"><link rel="prefetch" href="/assets/js/121.c3d251b8.js"><link rel="prefetch" href="/assets/js/122.62b1caba.js"><link rel="prefetch" href="/assets/js/123.787c2ab0.js"><link rel="prefetch" href="/assets/js/124.a880746f.js"><link rel="prefetch" href="/assets/js/125.d8edfe7b.js"><link rel="prefetch" href="/assets/js/126.4ff01546.js"><link rel="prefetch" href="/assets/js/127.9416d1ff.js"><link rel="prefetch" href="/assets/js/128.01a4a7a0.js"><link rel="prefetch" href="/assets/js/129.76876665.js"><link rel="prefetch" href="/assets/js/13.922328e9.js"><link rel="prefetch" href="/assets/js/130.7f631dd9.js"><link rel="prefetch" href="/assets/js/131.c9e0fde9.js"><link rel="prefetch" href="/assets/js/132.1c04cde5.js"><link rel="prefetch" href="/assets/js/133.e8f381cd.js"><link rel="prefetch" href="/assets/js/134.03d19f8b.js"><link rel="prefetch" href="/assets/js/135.44607494.js"><link rel="prefetch" href="/assets/js/136.6a1eb3c9.js"><link rel="prefetch" href="/assets/js/137.27898fd1.js"><link rel="prefetch" href="/assets/js/138.5bc0cf54.js"><link rel="prefetch" href="/assets/js/139.c2d1addc.js"><link rel="prefetch" href="/assets/js/14.e54d7526.js"><link rel="prefetch" href="/assets/js/140.052ec8e4.js"><link rel="prefetch" href="/assets/js/141.131abb5a.js"><link rel="prefetch" href="/assets/js/142.6ba6c07b.js"><link rel="prefetch" href="/assets/js/143.5dd51d22.js"><link rel="prefetch" href="/assets/js/144.b45afca8.js"><link rel="prefetch" href="/assets/js/145.faa9fb04.js"><link rel="prefetch" href="/assets/js/146.b54c024d.js"><link rel="prefetch" href="/assets/js/147.a1223242.js"><link rel="prefetch" href="/assets/js/148.4767bcb2.js"><link rel="prefetch" href="/assets/js/149.b65ab046.js"><link rel="prefetch" href="/assets/js/15.7082a3da.js"><link rel="prefetch" href="/assets/js/150.9bd8c175.js"><link rel="prefetch" href="/assets/js/151.9f830e96.js"><link rel="prefetch" href="/assets/js/152.41cde7f0.js"><link rel="prefetch" href="/assets/js/153.f57d65e0.js"><link rel="prefetch" href="/assets/js/154.5d7c8d51.js"><link rel="prefetch" href="/assets/js/155.0ae99532.js"><link rel="prefetch" href="/assets/js/156.5a54e043.js"><link rel="prefetch" href="/assets/js/157.c25b5d40.js"><link rel="prefetch" href="/assets/js/158.aa025b46.js"><link rel="prefetch" href="/assets/js/159.47939d88.js"><link rel="prefetch" href="/assets/js/16.fc775b7b.js"><link rel="prefetch" href="/assets/js/160.f8624459.js"><link rel="prefetch" href="/assets/js/161.7a075dc2.js"><link rel="prefetch" href="/assets/js/162.1d48f266.js"><link rel="prefetch" href="/assets/js/163.5d68a99f.js"><link rel="prefetch" href="/assets/js/164.1262d0e5.js"><link rel="prefetch" href="/assets/js/165.2ccf0bdd.js"><link rel="prefetch" href="/assets/js/166.21ece4d9.js"><link rel="prefetch" href="/assets/js/167.bf8adb95.js"><link rel="prefetch" href="/assets/js/168.1cb8440d.js"><link rel="prefetch" href="/assets/js/169.1dd1e396.js"><link rel="prefetch" href="/assets/js/17.ecc7be70.js"><link rel="prefetch" href="/assets/js/170.c29ec18f.js"><link rel="prefetch" href="/assets/js/171.38820827.js"><link rel="prefetch" href="/assets/js/172.bbc8ffc6.js"><link rel="prefetch" href="/assets/js/173.470e21e7.js"><link rel="prefetch" href="/assets/js/174.3c2df318.js"><link rel="prefetch" href="/assets/js/175.d2690cdb.js"><link rel="prefetch" href="/assets/js/176.9ca64696.js"><link rel="prefetch" href="/assets/js/177.76f3271d.js"><link rel="prefetch" href="/assets/js/179.b5644743.js"><link rel="prefetch" href="/assets/js/18.31fe7ecd.js"><link rel="prefetch" href="/assets/js/180.7592d5ef.js"><link rel="prefetch" href="/assets/js/181.5cb77d35.js"><link rel="prefetch" href="/assets/js/182.6fa5633c.js"><link rel="prefetch" href="/assets/js/183.b3a53d1b.js"><link rel="prefetch" href="/assets/js/184.3815c537.js"><link rel="prefetch" href="/assets/js/185.bcf4ab71.js"><link rel="prefetch" href="/assets/js/186.1cc02f6d.js"><link rel="prefetch" href="/assets/js/187.8b425fb7.js"><link rel="prefetch" href="/assets/js/188.44ccbd02.js"><link rel="prefetch" href="/assets/js/189.353b35e3.js"><link rel="prefetch" href="/assets/js/19.520992d5.js"><link rel="prefetch" href="/assets/js/190.c284595f.js"><link rel="prefetch" href="/assets/js/191.788ecc2d.js"><link rel="prefetch" href="/assets/js/192.712a164e.js"><link rel="prefetch" href="/assets/js/193.da58aba3.js"><link rel="prefetch" href="/assets/js/194.6b1b1f4d.js"><link rel="prefetch" href="/assets/js/195.c31d5c39.js"><link rel="prefetch" href="/assets/js/196.f6670c4d.js"><link rel="prefetch" href="/assets/js/197.5a1f50ab.js"><link rel="prefetch" href="/assets/js/2.ab565158.js"><link rel="prefetch" href="/assets/js/20.69e29cdc.js"><link rel="prefetch" href="/assets/js/21.2fd424ad.js"><link rel="prefetch" href="/assets/js/22.d4c0be54.js"><link rel="prefetch" href="/assets/js/23.4bb90ecc.js"><link rel="prefetch" href="/assets/js/24.c01be6b2.js"><link rel="prefetch" href="/assets/js/25.c8833687.js"><link rel="prefetch" href="/assets/js/26.8042b555.js"><link rel="prefetch" href="/assets/js/27.0d5fa4c0.js"><link rel="prefetch" href="/assets/js/28.f9735b8b.js"><link rel="prefetch" href="/assets/js/29.3af53626.js"><link rel="prefetch" href="/assets/js/30.5f1b56d1.js"><link rel="prefetch" href="/assets/js/31.544b2649.js"><link rel="prefetch" href="/assets/js/32.aa321988.js"><link rel="prefetch" href="/assets/js/33.6aba2c86.js"><link rel="prefetch" href="/assets/js/34.e1bbff24.js"><link rel="prefetch" href="/assets/js/35.233f76e0.js"><link rel="prefetch" href="/assets/js/36.cb773972.js"><link rel="prefetch" href="/assets/js/37.393d9c59.js"><link rel="prefetch" href="/assets/js/38.e2d530c5.js"><link rel="prefetch" href="/assets/js/39.acaf1cc0.js"><link rel="prefetch" href="/assets/js/40.358f731e.js"><link rel="prefetch" href="/assets/js/41.ded24b7e.js"><link rel="prefetch" href="/assets/js/42.b9f683c3.js"><link rel="prefetch" href="/assets/js/43.c8fb3e66.js"><link rel="prefetch" href="/assets/js/44.633142da.js"><link rel="prefetch" href="/assets/js/45.6095e772.js"><link rel="prefetch" href="/assets/js/46.421d8c7a.js"><link rel="prefetch" href="/assets/js/47.da50fe47.js"><link rel="prefetch" href="/assets/js/48.15ff5726.js"><link rel="prefetch" href="/assets/js/49.b662e624.js"><link rel="prefetch" href="/assets/js/5.c1b8a209.js"><link rel="prefetch" href="/assets/js/50.a8bc75df.js"><link rel="prefetch" href="/assets/js/51.51e36ae7.js"><link rel="prefetch" href="/assets/js/52.54cc6e51.js"><link rel="prefetch" href="/assets/js/53.4173561d.js"><link rel="prefetch" href="/assets/js/54.7cab8416.js"><link rel="prefetch" href="/assets/js/55.3d7317d3.js"><link rel="prefetch" href="/assets/js/56.3c22255b.js"><link rel="prefetch" href="/assets/js/57.18e46e30.js"><link rel="prefetch" href="/assets/js/58.aad57f31.js"><link rel="prefetch" href="/assets/js/59.7897f6a7.js"><link rel="prefetch" href="/assets/js/6.3131f88a.js"><link rel="prefetch" href="/assets/js/60.5cd0051a.js"><link rel="prefetch" href="/assets/js/61.d9606403.js"><link rel="prefetch" href="/assets/js/62.aede9df0.js"><link rel="prefetch" href="/assets/js/63.2c30e554.js"><link rel="prefetch" href="/assets/js/64.18228ab7.js"><link rel="prefetch" href="/assets/js/65.27cb3fba.js"><link rel="prefetch" href="/assets/js/66.2fa6c2dc.js"><link rel="prefetch" href="/assets/js/67.d274a8df.js"><link rel="prefetch" href="/assets/js/68.3069cfcf.js"><link rel="prefetch" href="/assets/js/69.4c28600f.js"><link rel="prefetch" href="/assets/js/7.89e6165d.js"><link rel="prefetch" href="/assets/js/70.4175440c.js"><link rel="prefetch" href="/assets/js/71.2ee6b435.js"><link rel="prefetch" href="/assets/js/72.c75e3bb8.js"><link rel="prefetch" href="/assets/js/73.6f8b8211.js"><link rel="prefetch" href="/assets/js/74.6c7720cf.js"><link rel="prefetch" href="/assets/js/75.cccfb229.js"><link rel="prefetch" href="/assets/js/76.f022e5da.js"><link rel="prefetch" href="/assets/js/77.dab46206.js"><link rel="prefetch" href="/assets/js/78.ca574b2a.js"><link rel="prefetch" href="/assets/js/79.3d75e618.js"><link rel="prefetch" href="/assets/js/80.091749b1.js"><link rel="prefetch" href="/assets/js/81.14db0e21.js"><link rel="prefetch" href="/assets/js/82.8a2b1809.js"><link rel="prefetch" href="/assets/js/83.84a4b599.js"><link rel="prefetch" href="/assets/js/84.11d7c222.js"><link rel="prefetch" href="/assets/js/85.273d4388.js"><link rel="prefetch" href="/assets/js/86.fb40e20c.js"><link rel="prefetch" href="/assets/js/87.3316639e.js"><link rel="prefetch" href="/assets/js/88.dfc52200.js"><link rel="prefetch" href="/assets/js/89.8d615f6e.js"><link rel="prefetch" href="/assets/js/90.1d9f08bb.js"><link rel="prefetch" href="/assets/js/91.566813e7.js"><link rel="prefetch" href="/assets/js/92.d13c6f41.js"><link rel="prefetch" href="/assets/js/93.845c42a0.js"><link rel="prefetch" href="/assets/js/94.20a37b77.js"><link rel="prefetch" href="/assets/js/95.1a498005.js"><link rel="prefetch" href="/assets/js/96.39fa7f4b.js"><link rel="prefetch" href="/assets/js/97.50f7170e.js"><link rel="prefetch" href="/assets/js/98.dd2e15d6.js"><link rel="prefetch" href="/assets/js/99.ef7ea06a.js"><link rel="prefetch" href="/assets/js/vendors~docsearch.ae6b1de9.js">
    <link rel="stylesheet" href="/assets/css/0.styles.952d6952.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><img src="https://cdn.jsdelivr.net/gh/cmty256/imgs-blog@main/logo/白云.38zbldnhh180.jpg" alt="ShuangChenYue" class="logo"> <span class="site-name can-hide">ShuangChenYue</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="CPP语言" class="dropdown-title"><!----> <span class="title" style="display:;">CPP语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/c5bdd8/" class="nav-link">Cpp之旅</a></li><li class="dropdown-item"><!----> <a href="/pages/279e62/" class="nav-link">Cpp专栏</a></li><li class="dropdown-item"><!----> <a href="/pages/801755/" class="nav-link">Effective_CPP</a></li><li class="dropdown-item"><!----> <a href="/pages/6b2468/" class="nav-link">muduo网络库</a></li><li class="dropdown-item"><!----> <a href="/pages/5f8c9f/" class="nav-link">Unix环境高级编程</a></li><li class="dropdown-item"><!----> <a href="/pages/3f1d21/" class="nav-link">Cpp提高编程</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="计算机基础" class="dropdown-title"><!----> <span class="title" style="display:;">计算机基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/7b1cb2/" class="nav-link">计算机网络</a></li><li class="dropdown-item"><!----> <a href="/pages/6048a8/" class="nav-link">操作系统</a></li><li class="dropdown-item"><!----> <a href="/pages/3b34ba/" class="nav-link">数据结构</a></li><li class="dropdown-item"><!----> <a href="/pages/412fe7/" class="nav-link">Linux</a></li><li class="dropdown-item"><!----> <a href="/pages/2dcfa1/" class="nav-link">算法</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据库" class="dropdown-title"><!----> <span class="title" style="display:;">数据库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/efa3f2/" class="nav-link">基础篇</a></li><li class="dropdown-item"><!----> <a href="/pages/ccc445/" class="nav-link">MySql</a></li><li class="dropdown-item"><!----> <a href="/pages/54616e/" class="nav-link">Redis</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="嵌入式软件开发" class="dropdown-title"><!----> <span class="title" style="display:;">嵌入式软件开发</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/d142c2/" class="nav-link">电子嵌入式通信协议</a></li><li class="dropdown-item"><!----> <a href="/pages/4c6bf3/" class="nav-link">深入浅出SSD</a></li><li class="dropdown-item"><!----> <a href="/pages/d3f36a/" class="nav-link">文件系统</a></li><li class="dropdown-item"><!----> <a href="/pages/e0cca7/" class="nav-link">汇编语言</a></li><li class="dropdown-item"><!----> <a href="/pages/fab2d7/" class="nav-link">STM32</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发日常" class="dropdown-title"><!----> <span class="title" style="display:;">开发日常</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/e472d1/" class="nav-link">随笔（持续更新）</a></li><li class="dropdown-item"><!----> <a href="/pages/71f6ae/" class="nav-link">Git知识总结</a></li><li class="dropdown-item"><!----> <a href="/pages/db6fb8/" class="nav-link">Git备忘清单</a></li><li class="dropdown-item"><!----> <a href="/pages/e1081f/" class="nav-link">Git 创建删除远程分支</a></li><li class="dropdown-item"><!----> <a href="/pages/777b8a/" class="nav-link">nvm使用小结</a></li><li class="dropdown-item"><!----> <a href="/pages/ee770e/" class="nav-link">虚拟机固定 IP 地址</a></li><li class="dropdown-item"><!----> <a href="/pages/1ab9a6/" class="nav-link">Shell 脚本学习笔记</a></li><li class="dropdown-item"><!----> <a href="/pages/411aa4/" class="nav-link">VScode 插件 CodeGeeX 使用教程</a></li><li class="dropdown-item"><!----> <a href="/pages/0d525d/" class="nav-link">KylinV10 将项目上传至 Github教程</a></li><li class="dropdown-item"><!----> <a href="/pages/907786/" class="nav-link">KylinV10 安装 MySQL 教程（可防踩雷）</a></li><li class="dropdown-item"><!----> <a href="/pages/a2d21e/" class="nav-link">kylinV10-SP1 安装 QT</a></li><li class="dropdown-item"><!----> <a href="/pages/b561cf/" class="nav-link">高并发内存池</a></li><li class="dropdown-item"><!----> <a href="/pages/6ab6d1/" class="nav-link">USBGUARD 项目编译环境配置</a></li><li class="dropdown-item"><!----> <a href="/pages/883f02/" class="nav-link">Power_Destory 项目</a></li><li class="dropdown-item"><!----> <a href="/pages/479472/" class="nav-link">U 盘清除工具编译教程</a></li><li class="dropdown-item"><!----> <a href="/pages/9c4241/" class="nav-link">个人博客代码推送教程</a></li><li class="dropdown-item"><!----> <a href="/pages/3ad765/" class="nav-link">SVN Trunk Branches的Merge操作</a></li><li class="dropdown-item"><!----> <a href="/pages/0c0ca8/" class="nav-link">如何高效阅读嵌入式项目代码</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端学习" class="dropdown-title"><!----> <span class="title" style="display:;">前端学习</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/99897f/" class="nav-link">HTML与CSS</a></li><li class="dropdown-item"><!----> <a href="/pages/51542d/" class="nav-link">JS学习</a></li><li class="dropdown-item"><!----> <a href="/pages/803f9d/" class="nav-link">Vue3入门</a></li><li class="dropdown-item"><!----> <a href="/pages/ca4cfb/" class="nav-link">Vue3进阶</a></li><li class="dropdown-item"><!----> <a href="/pages/50e8d3/" class="nav-link">黑马Vue3</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="MFC" class="dropdown-title"><!----> <span class="title" style="display:;">MFC</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/a4b108/" class="nav-link">MFC编程随记</a></li><li class="dropdown-item"><!----> <a href="/pages/41acbd/" class="nav-link">MFC实现ini配置文件的读取</a></li><li class="dropdown-item"><!----> <a href="/pages/951a7a/" class="nav-link">MFC实现点击列表头排序</a></li><li class="dropdown-item"><!----> <a href="/pages/a8598f/" class="nav-link">贴图法美化Button按钮</a></li><li class="dropdown-item"><!----> <a href="/pages/054516/" class="nav-link">MFC使用细节</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="闪存" class="dropdown-title"><!----> <span class="title" style="display:;">闪存</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/b925b8/" class="nav-link">如何高效阅读嵌入式项目代码</a></li><li class="dropdown-item"><!----> <a href="/pages/28ec23/" class="nav-link">NAND Flash</a></li><li class="dropdown-item"><!----> <a href="/pages/62bf40/" class="nav-link">ARM 处理器</a></li><li class="dropdown-item"><!----> <a href="/pages/1a9374/" aria-current="page" class="nav-link router-link-exact-active router-link-active">嵌入式基础知识-存储器</a></li><li class="dropdown-item"><!----> <a href="/pages/aac5e3/" class="nav-link">闪存存储和制造技术概述</a></li><li class="dropdown-item"><!----> <a href="/pages/8f6056/" class="nav-link">芯片IO驱动力</a></li><li class="dropdown-item"><!----> <a href="/pages/d146b8/" class="nav-link">主流先进封装技术介绍</a></li><li class="dropdown-item"><!----> <a href="/pages/16f0ba/" class="nav-link">NAND Flash基础</a></li><li class="dropdown-item"><!----> <a href="/pages/90d8d0/" class="nav-link">基于PA算法的FTL引导</a></li><li class="dropdown-item"><!----> <a href="/pages/eb672b/" class="nav-link">SD逻辑擦除和物理擦除</a></li><li class="dropdown-item"><!----> <a href="/pages/747121/" class="nav-link">NAND Flash的SDR、ONFI、DDR接口</a></li><li class="dropdown-item"><!----> <a href="/pages/1eb351/" class="nav-link">【详解】Nand Flash必看知识</a></li><li class="dropdown-item"><!----> <a href="/pages/d2512a/" class="nav-link">【两万字详解】Nand Flash必看知识</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="面经" class="dropdown-title"><!----> <span class="title" style="display:;">面经</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/d69946/" class="nav-link">虎牙C++技术面经</a></li><li class="dropdown-item"><!----> <a href="/pages/29251d/" class="nav-link">金山一面复习</a></li><li class="dropdown-item"><!----> <a href="/pages/c7c01f/" class="nav-link">完美世界秋招 C++ 游戏开发面经(Cpp部分)</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="其它" class="dropdown-title"><!----> <span class="title" style="display:;">其它</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/fa256e/" class="nav-link">博客搭建</a></li><li class="dropdown-item"><!----> <a href="/pages/335531/" class="nav-link">网站收藏箱</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar-hover-trigger"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">首页</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="CPP语言" class="dropdown-title"><!----> <span class="title" style="display:;">CPP语言</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/c5bdd8/" class="nav-link">Cpp之旅</a></li><li class="dropdown-item"><!----> <a href="/pages/279e62/" class="nav-link">Cpp专栏</a></li><li class="dropdown-item"><!----> <a href="/pages/801755/" class="nav-link">Effective_CPP</a></li><li class="dropdown-item"><!----> <a href="/pages/6b2468/" class="nav-link">muduo网络库</a></li><li class="dropdown-item"><!----> <a href="/pages/5f8c9f/" class="nav-link">Unix环境高级编程</a></li><li class="dropdown-item"><!----> <a href="/pages/3f1d21/" class="nav-link">Cpp提高编程</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="计算机基础" class="dropdown-title"><!----> <span class="title" style="display:;">计算机基础</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/7b1cb2/" class="nav-link">计算机网络</a></li><li class="dropdown-item"><!----> <a href="/pages/6048a8/" class="nav-link">操作系统</a></li><li class="dropdown-item"><!----> <a href="/pages/3b34ba/" class="nav-link">数据结构</a></li><li class="dropdown-item"><!----> <a href="/pages/412fe7/" class="nav-link">Linux</a></li><li class="dropdown-item"><!----> <a href="/pages/2dcfa1/" class="nav-link">算法</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="数据库" class="dropdown-title"><!----> <span class="title" style="display:;">数据库</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/efa3f2/" class="nav-link">基础篇</a></li><li class="dropdown-item"><!----> <a href="/pages/ccc445/" class="nav-link">MySql</a></li><li class="dropdown-item"><!----> <a href="/pages/54616e/" class="nav-link">Redis</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="嵌入式软件开发" class="dropdown-title"><!----> <span class="title" style="display:;">嵌入式软件开发</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/d142c2/" class="nav-link">电子嵌入式通信协议</a></li><li class="dropdown-item"><!----> <a href="/pages/4c6bf3/" class="nav-link">深入浅出SSD</a></li><li class="dropdown-item"><!----> <a href="/pages/d3f36a/" class="nav-link">文件系统</a></li><li class="dropdown-item"><!----> <a href="/pages/e0cca7/" class="nav-link">汇编语言</a></li><li class="dropdown-item"><!----> <a href="/pages/fab2d7/" class="nav-link">STM32</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发日常" class="dropdown-title"><!----> <span class="title" style="display:;">开发日常</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/e472d1/" class="nav-link">随笔（持续更新）</a></li><li class="dropdown-item"><!----> <a href="/pages/71f6ae/" class="nav-link">Git知识总结</a></li><li class="dropdown-item"><!----> <a href="/pages/db6fb8/" class="nav-link">Git备忘清单</a></li><li class="dropdown-item"><!----> <a href="/pages/e1081f/" class="nav-link">Git 创建删除远程分支</a></li><li class="dropdown-item"><!----> <a href="/pages/777b8a/" class="nav-link">nvm使用小结</a></li><li class="dropdown-item"><!----> <a href="/pages/ee770e/" class="nav-link">虚拟机固定 IP 地址</a></li><li class="dropdown-item"><!----> <a href="/pages/1ab9a6/" class="nav-link">Shell 脚本学习笔记</a></li><li class="dropdown-item"><!----> <a href="/pages/411aa4/" class="nav-link">VScode 插件 CodeGeeX 使用教程</a></li><li class="dropdown-item"><!----> <a href="/pages/0d525d/" class="nav-link">KylinV10 将项目上传至 Github教程</a></li><li class="dropdown-item"><!----> <a href="/pages/907786/" class="nav-link">KylinV10 安装 MySQL 教程（可防踩雷）</a></li><li class="dropdown-item"><!----> <a href="/pages/a2d21e/" class="nav-link">kylinV10-SP1 安装 QT</a></li><li class="dropdown-item"><!----> <a href="/pages/b561cf/" class="nav-link">高并发内存池</a></li><li class="dropdown-item"><!----> <a href="/pages/6ab6d1/" class="nav-link">USBGUARD 项目编译环境配置</a></li><li class="dropdown-item"><!----> <a href="/pages/883f02/" class="nav-link">Power_Destory 项目</a></li><li class="dropdown-item"><!----> <a href="/pages/479472/" class="nav-link">U 盘清除工具编译教程</a></li><li class="dropdown-item"><!----> <a href="/pages/9c4241/" class="nav-link">个人博客代码推送教程</a></li><li class="dropdown-item"><!----> <a href="/pages/3ad765/" class="nav-link">SVN Trunk Branches的Merge操作</a></li><li class="dropdown-item"><!----> <a href="/pages/0c0ca8/" class="nav-link">如何高效阅读嵌入式项目代码</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端学习" class="dropdown-title"><!----> <span class="title" style="display:;">前端学习</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/99897f/" class="nav-link">HTML与CSS</a></li><li class="dropdown-item"><!----> <a href="/pages/51542d/" class="nav-link">JS学习</a></li><li class="dropdown-item"><!----> <a href="/pages/803f9d/" class="nav-link">Vue3入门</a></li><li class="dropdown-item"><!----> <a href="/pages/ca4cfb/" class="nav-link">Vue3进阶</a></li><li class="dropdown-item"><!----> <a href="/pages/50e8d3/" class="nav-link">黑马Vue3</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="MFC" class="dropdown-title"><!----> <span class="title" style="display:;">MFC</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/a4b108/" class="nav-link">MFC编程随记</a></li><li class="dropdown-item"><!----> <a href="/pages/41acbd/" class="nav-link">MFC实现ini配置文件的读取</a></li><li class="dropdown-item"><!----> <a href="/pages/951a7a/" class="nav-link">MFC实现点击列表头排序</a></li><li class="dropdown-item"><!----> <a href="/pages/a8598f/" class="nav-link">贴图法美化Button按钮</a></li><li class="dropdown-item"><!----> <a href="/pages/054516/" class="nav-link">MFC使用细节</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="闪存" class="dropdown-title"><!----> <span class="title" style="display:;">闪存</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/b925b8/" class="nav-link">如何高效阅读嵌入式项目代码</a></li><li class="dropdown-item"><!----> <a href="/pages/28ec23/" class="nav-link">NAND Flash</a></li><li class="dropdown-item"><!----> <a href="/pages/62bf40/" class="nav-link">ARM 处理器</a></li><li class="dropdown-item"><!----> <a href="/pages/1a9374/" aria-current="page" class="nav-link router-link-exact-active router-link-active">嵌入式基础知识-存储器</a></li><li class="dropdown-item"><!----> <a href="/pages/aac5e3/" class="nav-link">闪存存储和制造技术概述</a></li><li class="dropdown-item"><!----> <a href="/pages/8f6056/" class="nav-link">芯片IO驱动力</a></li><li class="dropdown-item"><!----> <a href="/pages/d146b8/" class="nav-link">主流先进封装技术介绍</a></li><li class="dropdown-item"><!----> <a href="/pages/16f0ba/" class="nav-link">NAND Flash基础</a></li><li class="dropdown-item"><!----> <a href="/pages/90d8d0/" class="nav-link">基于PA算法的FTL引导</a></li><li class="dropdown-item"><!----> <a href="/pages/eb672b/" class="nav-link">SD逻辑擦除和物理擦除</a></li><li class="dropdown-item"><!----> <a href="/pages/747121/" class="nav-link">NAND Flash的SDR、ONFI、DDR接口</a></li><li class="dropdown-item"><!----> <a href="/pages/1eb351/" class="nav-link">【详解】Nand Flash必看知识</a></li><li class="dropdown-item"><!----> <a href="/pages/d2512a/" class="nav-link">【两万字详解】Nand Flash必看知识</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="面经" class="dropdown-title"><!----> <span class="title" style="display:;">面经</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/d69946/" class="nav-link">虎牙C++技术面经</a></li><li class="dropdown-item"><!----> <a href="/pages/29251d/" class="nav-link">金山一面复习</a></li><li class="dropdown-item"><!----> <a href="/pages/c7c01f/" class="nav-link">完美世界秋招 C++ 游戏开发面经(Cpp部分)</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="其它" class="dropdown-title"><!----> <span class="title" style="display:;">其它</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/pages/fa256e/" class="nav-link">博客搭建</a></li><li class="dropdown-item"><!----> <a href="/pages/335531/" class="nav-link">网站收藏箱</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><a href="/pages/1a9374/" aria-current="page" class="active sidebar-link">嵌入式基础知识——存储器</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level2"><a href="/pages/1a9374/#_1-计算机存储结构" class="sidebar-link">1. 计算机存储结构</a></li><li class="sidebar-sub-header level2"><a href="/pages/1a9374/#_2-存储器分类" class="sidebar-link">2. 存储器分类</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_2-1-ram-内存-与-rom-硬盘" class="sidebar-link">2.1 RAM（内存） 与 ROM（硬盘）</a></li><li class="sidebar-sub-header level4"><a href="/pages/1a9374/#_2-1-1-主存储器-ram" class="sidebar-link">2.1.1 主存储器 RAM</a></li><li class="sidebar-sub-header level4"><a href="/pages/1a9374/#_2-1-2-辅助存储器-rom" class="sidebar-link">2.1.2 辅助存储器 ROM</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_2-2-cache" class="sidebar-link">2.2 Cache</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_2-3-其他" class="sidebar-link">2.3 其他</a></li><li class="sidebar-sub-header level4"><a href="/pages/1a9374/#_2-3-1-flash" class="sidebar-link">2.3.1 Flash</a></li><li class="sidebar-sub-header level4"><a href="/pages/1a9374/#_2-3-2-磁盘、光盘等" class="sidebar-link">2.3.2 磁盘、光盘等</a></li></ul></li><li class="sidebar-sub-header level2"><a href="/pages/1a9374/#_3-三级存储体系" class="sidebar-link">3. 三级存储体系</a></li><li class="sidebar-sub-header level2"><a href="/pages/1a9374/#_4-高速缓存控制器" class="sidebar-link">4. 高速缓存控制器</a></li><li class="sidebar-sub-header level2"><a href="/pages/1a9374/#_5-一些存储相关的计算题" class="sidebar-link">5. 一些存储相关的计算题</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_5-1-题目一" class="sidebar-link">5.1 题目一</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_5-2-题目二" class="sidebar-link">5.2 题目二</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_5-3-题目三" class="sidebar-link">5.3 题目三</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_5-4-题目四" class="sidebar-link">5.4 题目四</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_5-5-题目五" class="sidebar-link">5.5 题目五</a></li></ul></li><li class="sidebar-sub-header level2"><a href="/pages/1a9374/#_6-其他计算机基础知识" class="sidebar-link">6. 其他计算机基础知识</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_6-1-冯诺依曼计算机组成结构图" class="sidebar-link">6.1 冯诺依曼计算机组成结构图</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_6-2-总线" class="sidebar-link">6.2 总线</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_6-3-地址空间" class="sidebar-link">6.3 地址空间</a></li><li class="sidebar-sub-header level3"><a href="/pages/1a9374/#_6-4-cpu-工作原理简述" class="sidebar-link">6.4 CPU 工作原理简述</a></li></ul></li></ul></li><li><a href="/pages/b925b8/" class="sidebar-link">如何高效阅读嵌入式项目代码</a></li><li><a href="/pages/aac5e3/" class="sidebar-link">闪存存储和制造技术概述</a></li><li><a href="/pages/8f6056/" class="sidebar-link">芯片 IO 驱动力</a></li><li><a href="/pages/62bf40/" class="sidebar-link">ARM处理器</a></li><li><a href="/pages/28ec23/" class="sidebar-link">Nand Flash</a></li><li><a href="/pages/d146b8/" class="sidebar-link">主流先进封装技术介绍</a></li><li><a href="/pages/16f0ba/" class="sidebar-link">Nand Flash 基础</a></li><li><a href="/pages/90d8d0/" class="sidebar-link">基于PA算法的FTL引导</a></li><li><a href="/pages/eb672b/" class="sidebar-link">SD 逻辑擦除和物理擦除</a></li><li><a href="/pages/747121/" class="sidebar-link">NAND Flash 的 SDR、ONFI、DDR 接口</a></li><li><a href="/pages/1eb351/" class="sidebar-link">【详解】Nand Flash 必看知识 1</a></li><li><a href="/pages/d2512a/" class="sidebar-link">【两万字详解】Nand Flash 必看知识</a></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-06225672><div class="articleInfo" data-v-06225672><ul class="breadcrumbs" data-v-06225672><li data-v-06225672><a href="/" title="首页" class="iconfont icon-home router-link-active" data-v-06225672></a></li> <li data-v-06225672><span data-v-06225672>闪存</span></li></ul> <div class="info" data-v-06225672><div title="作者" class="author iconfont icon-touxiang" data-v-06225672><a href="javascript:;" data-v-06225672>霜晨月</a></div> <div title="创建时间" class="date iconfont icon-riqi" data-v-06225672><a href="javascript:;" data-v-06225672>2024-06-03</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-title">目录</div> <div class="right-menu-content"></div></div></div> <h1><img src="">嵌入式基础知识——存储器<!----></h1> <!----> <div class="theme-vdoing-content content__default"><h1 id="嵌入式基础知识-存储器"><a href="#嵌入式基础知识-存储器" class="header-anchor">#</a> 嵌入式基础知识——存储器</h1> <h2 id="_1-计算机存储结构"><a href="#_1-计算机存储结构" class="header-anchor">#</a> 1. 计算机存储结构</h2> <p>存储器是用来存储程序和数据的部件,是实现&quot;存储程序控制&quot;的基础，理想的存储器应该是执行快，容量足，价格便宜等。但实际上，目前无法同时满足这些目标，因此计算机通常采用分级存储的方式。</p> <p><img alt="image" data-src="https://cdn.jsdelivr.net/gh/xiaose-code/picx-images-hosting@master/jianrong/image.4uapzn3uo5.webp" loading="lazy" class="lazy"></p> <ul><li>寄存器：CPU 寄存器，保存来自 cache 的字</li> <li>L1 高速缓存：芯片内的高速缓存 cache，保存来自芯片外 cache 的行</li> <li>L2 高速缓存：芯片外的高速缓存，如 SRAM、DRAM、DDRAM，保存来自主存储器cache 的行</li> <li>主存储器：如 Flash、PROM、EPROM、EEPROM，保存来自外部存储器的文件</li> <li>外部存储器：如磁盘、光盘、CF卡、SD卡等</li> <li>远程二级存储：如分布式文件系统，Web 服务器</li></ul> <h2 id="_2-存储器分类"><a href="#_2-存储器分类" class="header-anchor">#</a> 2. 存储器分类</h2> <h3 id="_2-1-ram-内存-与-rom-硬盘"><a href="#_2-1-ram-内存-与-rom-硬盘" class="header-anchor">#</a> 2.1 RAM（内存） 与 ROM（硬盘）</h3> <p>按照存储器存放信息易失性，可分为 RAM 和 ROM：</p> <ul><li>RAM：随机存储器（Random Access Memory），读写速度快，但掉电时会丢失其存储的内容。速度、价格、容量介于 Cache 与辅存之间、断电数据丢失、CPU 可直接访问
存储当前正在执行的程序和数据。</li> <li>ROM：只读存储器（Read-Only Memory）,存储的内容掉电后不会丢失。速度最慢、价格最低、容量最大、断电数据不丢失、CPU 不可直接访问存储暂时不运行的程序和数据，需要时再传送到主存。</li></ul> <h4 id="_2-1-1-主存储器-ram"><a href="#_2-1-1-主存储器-ram" class="header-anchor">#</a> 2.1.1 主存储器 RAM</h4> <p>按照 RAM 存储单元的工作原理，又可分为如下几类：</p> <ul><li>SRAM：静态随机存储器（Static RAM）,它是靠触发器的自保护功能存储数据，数据一旦写入，其信息就稳定的保存在电路中等待读出，无论读出多少次，只要不断电，信息会一直保存；</li> <li>DRAM：动态随机存储器（Dynamic RAM），它将每个位存储为对一个电容的充电，而它的电容容量小，易漏电，因此需要定时给电容补电，通常称为&quot;刷新&quot;；</li> <li>DDR SDRAM：双倍速率同步动态随机存储器（Double Date Rate SDRAM），或称为 DDR。DDR 内存是在 SDRAM 内存的基础上发展而来的</li></ul> <h4 id="_2-1-2-辅助存储器-rom"><a href="#_2-1-2-辅助存储器-rom" class="header-anchor">#</a> 2.1.2 辅助存储器 ROM</h4> <ul><li>PROM：可编程只读存储器（Programmable ROM）</li> <li>EPROM：可抹除可编程只读存储器（Erasable Programmable ROM）</li> <li>EEPROM：电子式可抹除可编程只读存储器（Electrically Erasable Programmable ROM）</li></ul> <h3 id="_2-2-cache"><a href="#_2-2-cache" class="header-anchor">#</a> 2.2 Cache</h3> <p>Cache 是一种比常见内存更快的存储器，一般称为高速缓存存储器。</p> <p>根据 Cache 的工作机制，可分为：</p> <ul><li>回写式 Cache：当 CPU 执行写数据时，回写式 Cache 只把该数据写入其数据地址对应的 Cache 中，不直接写入内存。仅当该 Cache 块需要替换时，才把 Cache 写回写入内存中</li> <li>写通式 Cache：当 CPU 执行写数据时，写通式 Cache 必须同时把该数据写入其数据地址对应的 Cache 块和内存中。</li></ul> <h3 id="_2-3-其他"><a href="#_2-3-其他" class="header-anchor">#</a> 2.3 其他</h3> <h4 id="_2-3-1-flash"><a href="#_2-3-1-flash" class="header-anchor">#</a> 2.3.1 Flash</h4> <p>Flash 称为快闪存储器，简称闪存，因其擦除和写入速度比较快而得名。</p> <p><strong>Flash 是 EEPROM 的变种，不同的是 EEPROM 能在字节水平上进行擦除重新，而 Flash 需要在块的水平上进行擦除。</strong></p> <ul><li>NOR Flash：它带有 SRAM 接口，有足够的地址引脚来寻址，可以方便地存取其内部的每一个字节，因此可直接连接总线系统，构成内存储器；</li> <li>NAND Flash：它使用复杂的 I/O 口来串行地存取数据，采用串行接口，不能直接构成内存，只能用来构成外部存储器。</li></ul> <p>两者的一些特点对比：</p> <ul><li>NOR 的读速度比 NAND 稍快</li> <li>NAND 的写速度比 NOR 快很多</li> <li>NAND 的擦除速度也比 NOR 快很多</li> <li>NAND 的擦除单元更小</li> <li>NOR 上可直接运行程序，NAND 只能存储信息</li></ul> <h4 id="_2-3-2-磁盘、光盘等"><a href="#_2-3-2-磁盘、光盘等" class="header-anchor">#</a> 2.3.2 磁盘、光盘等</h4> <ul><li>磁盘：利用磁头变化和磁化电流进行读/写的存储器</li> <li>光盘：用光学方式读/写信息的圆盘</li> <li>CF卡：紧凑式闪存（Compact Flash），由 SanDisk 公司于1994年生成，并制定相关规范</li> <li>SD卡：安全数字存储卡（Secure Digital Memory Card）</li></ul> <h2 id="_3-三级存储体系"><a href="#_3-三级存储体系" class="header-anchor">#</a> 3. 三级存储体系</h2> <p>上面介绍过，存储器的3个指标：容量、速度、价格往往无法同时满足，因此计算机采用多级存储器构成存储体系。</p> <p><strong>典型的三级存储结构，从内到外一般指Cache、主存储器、外部存储器。</strong></p> <p><img alt="image" data-src="https://cdn.jsdelivr.net/gh/xiaose-code/picx-images-hosting@master/jianrong/image.wiciz9tvk.webp" loading="lazy" class="lazy"></p> <p>Cache 设置在 CPU 和主存之间，可放在 CPU 的内部或外部，其作用是解决主存和 CPU 的速度匹配问题。</p> <p>除了速度匹配问题，存储还受容量制约，因此。还需要外部存储器提供大容量存储空间。</p> <h2 id="_4-高速缓存控制器"><a href="#_4-高速缓存控制器" class="header-anchor">#</a> 4. 高速缓存控制器</h2> <p>高速缓存控制器负责CPU与高速缓存和主存之间的通信控制</p> <p><img alt="image" data-src="https://cdn.jsdelivr.net/gh/xiaose-code/picx-images-hosting@master/jianrong/image.4n7i4818e8.webp" loading="lazy" class="lazy"></p> <h2 id="_5-一些存储相关的计算题"><a href="#_5-一些存储相关的计算题" class="header-anchor">#</a> 5. 一些存储相关的计算题</h2> <h3 id="_5-1-题目一"><a href="#_5-1-题目一" class="header-anchor">#</a> 5.1 题目一</h3> <p>某计算机总线是32位，地址空间从 <code>0xF000000</code> 到 <code>0xF007FFFF</code> 映射为 Flash 空间，若实现 Flash 的最大存储容量，至少需要多少片 <code>16Kx16bit</code> 的 Flash 芯片。</p> <blockquote><p>主存容量计算，内存地址和芯片计算问题，先要了解：</p> <ul><li>内存单元个数 = 内存尾地址 - 内存首地址 + 1</li> <li>内存容量 = 内存单元个数 x 每个内存单元容量</li> <li>将得出的 16 进制容量简化为 2 的幂的形式</li></ul></blockquote> <p>分析：</p> <ul><li>Flash 的存储单元个数为：<code>0xF007FFFF</code> - <code>0xF0000000</code> + 1 = <code>0x80000</code> = 2^19^ 个</li> <li>总线是 32 位，也表示内存单元的大小是 32bit</li> <li>因此，Flash 总的容量大小为 2^19^ × 32bit = 2^24^ bit</li> <li>每片的大小是 <code>16K x 16bit</code>，也即 2^18^ bit（2^14^ × 2^4^）</li> <li>因此，需要的片数为：2^24^ / 2^18^ = 2^6^ = 64片</li></ul> <h3 id="_5-2-题目二"><a href="#_5-2-题目二" class="header-anchor">#</a> 5.2 题目二</h3> <p>某计算机字长是 32位，存储容量是 256KB，求按字编址的寻址范围</p> <blockquote><p>一些基础知识：</p> <ul><li><strong>位</strong>：二进制的每一个 0 或 1 是组成二进制的<strong>最小单位</strong>，称为位(bit)。</li> <li><strong>字</strong>：计算机在存储、传送或操作时，作为一个单元的一组二进制码称为字。</li> <li><strong>字长</strong>：一个字中的二进制位的位数称为字长，常用的字长包括 8位、16位、32位、64位。例如，通常把处理字长为 8位数据的CPU称为 8位CPU。</li> <li><strong>字节</strong>：字长为 8位的编码称为字节(Byte)，字节是计算机中的<strong>基本编码单位</strong>。</li></ul></blockquote> <p>分析：</p> <ul><li>按字编址，需要知道字长，题目知字长 32位，即 4Byte</li> <li>存储容量 256KB，即 256K Byte</li> <li>所以，寻址范围为 256K / 4 = 64K</li></ul> <p>（个人理解：因为计算机存储传送或操作时是按字作为单位的，那么寻址也是按字进行寻址，这里一个字就是32位也就是 4Byte，所以寻址范围就是存储容量 / 一次寻址单位 = 256K / 4 = 64K 或者 65536字）</p> <h3 id="_5-3-题目三"><a href="#_5-3-题目三" class="header-anchor">#</a> 5.3 题目三</h3> <p>一个 <code>32K x 32位</code> 的静态存储器，求其地址线和数据线的位数</p> <p>分析：</p> <ul><li>32位，说明数据宽度是 32位，即数据线的位数是32</li> <li>32K，即 2^15^，所以地址线需要15位</li></ul> <h3 id="_5-4-题目四"><a href="#_5-4-题目四" class="header-anchor">#</a> 5.4 题目四</h3> <p>某计算机主存容量 64KB，其中 ROM 区为 4KB，其余是 RAM 区，按字节编址。若使用 <code>2K x 8位</code> 的 ROM 和 <code>4K x 4位</code> 的 RAM 设计该存储器，计算两种需用到的数量。</p> <p>分析：</p> <ul><li>由题目知，ROM 是 4KB，RAM 是 64 - 4 = 60KB</li> <li>按字节编址，则按 8bit 位编址</li> <li>一片 ROM 是  <code>2K x 8bit</code>，需要2片，即可满足大小为 4KB 的 ROM</li> <li>一片 RAM 是 <code>4K x 4bit</code>，需要30片（60K / 4K = 15，1Byte = 8位，8bit / 4 bit = 2，所以需要 15 × 2  = 30片 ）</li></ul> <h3 id="_5-5-题目五"><a href="#_5-5-题目五" class="header-anchor">#</a> 5.5 题目五</h3> <p>容量为 64块 的 Cache 采用组相连方式映射，块大小为 128 字节，每 4块 为一组，若主存容量为 4096 块，且以字节编址，求主存地址的位数和主存区号的位数。</p> <blockquote><p>基础知识：</p> <p>主存地址 = 区号 + 组号 + 组内块号 + 块内地址号</p></blockquote> <p>分析：</p> <ul><li>块大小为 128 字节，即 128 Byte</li> <li>主存容量为 4096块，即 4K 块，结合块的大小，主存容量为 <code>4K × 128 Byte</code> = 512KB = 2^19^ KB，所以主存地址需要 19 位</li> <li>块大小为 128 字节（2^7^），则块内地址需要用 7 位表示</li> <li>每 4 组为一块，则组内块号需要用 2 位表示</li> <li>Cache 容量为 64 块，则分了 16 组，则组号需要用 4位 表示</li> <li>主存区号位数 = 19 - 7 - 2 - 4 = 6</li></ul> <h2 id="_6-其他计算机基础知识"><a href="#_6-其他计算机基础知识" class="header-anchor">#</a> 6. 其他计算机基础知识</h2> <h3 id="_6-1-冯诺依曼计算机组成结构图"><a href="#_6-1-冯诺依曼计算机组成结构图" class="header-anchor">#</a> 6.1 冯诺依曼计算机组成结构图</h3> <p><img alt="image" data-src="https://cdn.jsdelivr.net/gh/xiaose-code/picx-images-hosting@master/jianrong/image.32hr5vts33.png" loading="lazy" class="lazy"></p> <ul><li><p>输入设备：把其他信号转换成计算机能识别和处理的信号并送入计算机中。如键盘、鼠标、摄像头等</p></li> <li><p>输出设备：把运算结果以人或其他设备所能接受的形式送出计算机0外。如显示器、音响、打印机等</p></li> <li><p>存储器：用来存储程序和数据的部件,是实现&quot;存储程序控制&quot;的基础。如内存、硬盘等</p></li> <li><p>运算器：CPU 中负责进行算数运算和逻辑运算的部件，其核心是算术逻辑单元 ALU</p></li> <li><p>控制器：是CPU的指挥中心,其控制着整个 CPU 执行程序的逻辑过程</p></li></ul> <h3 id="_6-2-总线"><a href="#_6-2-总线" class="header-anchor">#</a> 6.2 总线</h3> <ul><li><code>总线</code> ：总线是计算机中各个部件之间 <code>传送信息的公共通信干线</code>, 在物理上就是一束导线按照其传递信息的类型可以分为 <code>数据总线</code>、<code>地址总线</code>、<code>控制总线</code>。</li> <li><code>DMA总线</code> ：DMA(Direct Memory Access)即 <code>直接存储器访问</code>，使用 DMA 总线可以不通过 CPU 直接在存储器之间进行数据传递。</li></ul> <h3 id="_6-3-地址空间"><a href="#_6-3-地址空间" class="header-anchor">#</a> 6.3 地址空间</h3> <p>一个 <code>处理器</code> 能够访问（读写）的 <code>存储空间</code> 是有限的,我们称这个空间为它的 <code>地址空间（寻址空间）</code>，一般来说 <code>N位</code> 地址总线的处理器的地址空间是 <code>2的 N 次方</code>。</p> <p>例如：2位总线能访问 00、01、10、11 即 2^2^。</p> <h3 id="_6-4-cpu-工作原理简述"><a href="#_6-4-cpu-工作原理简述" class="header-anchor">#</a> 6.4 CPU 工作原理简述</h3> <p><img alt="image" data-src="https://cdn.jsdelivr.net/gh/xiaose-code/picx-images-hosting@master/jianrong/image.67x94u1j9j.png" loading="lazy" class="lazy"></p> <p><code>CPU执行指令的过程</code> :</p> <ul><li>CPU先通过 <code>指令计数器PC</code> 向内存写入要读取数据的地址，</li> <li>内存根据地址找到数据并返回给CPU，</li> <li>CPU通过 <code>指令寄存器IR</code> 接收到数据，将数据通过 <code>指令译码器</code> 翻译成 <code>可执行指令</code> 发送给运算器执行，运算结果储存在 <code>寄存器</code> 中，</li> <li>CPU指令计数器 <code>自增</code> 重复执行步骤。</li></ul> <p>==<strong>一条指令的执行分为三个阶段：</strong>==</p> <ol><li><code>取址</code> ：CPU 将 PC 寄存器中的地址发送给内存，内存将其地址中对应的指令返回到 CPU 中的指令寄存器（IR）</li> <li><code>译码</code> ：译码器对 IR 中的指令进行识别，将指令（机器码）解析成具体的运算</li> <li><code>执行</code> ：控制器控制运算器中对应的运算单元进行运算，运算结果写入寄存器</li></ol> <p>每执行一条指令后 PC 的值会自动增加指向下一条指令。</p></div></div> <!----> <div class="page-edit"><!----> <!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2024/6/3 14:54:44</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><!----> <a href="/pages/b925b8/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">如何高效阅读嵌入式项目代码</div></a></div> <div class="page-nav"><p class="inner"><!----> <span class="next"><a href="/pages/b925b8/">如何高效阅读嵌入式项目代码</a>→
      </span></p></div></div></div> <!----></main></div> <div class="footer"><!----> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> 
    | Copyright © 2023-2025
    <span>霜晨月</span></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">
          跟随系统
        </li><li class="iconfont icon-rijianmoshi">
          浅色模式
        </li><li class="iconfont icon-yejianmoshi">
          深色模式
        </li><li class="iconfont icon-yuedu">
          阅读模式
        </li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"><canvas id="vuepress-canvas-cursor"></canvas></div></div>
    <script src="/assets/js/app.67adcfd9.js" defer></script><script src="/assets/js/4.9aaa1650.js" defer></script><script src="/assets/js/1.5474518c.js" defer></script><script src="/assets/js/3.593d14fc.js" defer></script><script src="/assets/js/178.d7d9def2.js" defer></script>
  </body>
</html>
